package com.hoshiicloud.common.constant;

public enum OrderInfoReturnGoodStatusEnum {
    NO_NEED_RETURN_GOODS(0, "无需退货"),
    NOT_RETURN_GOODS(1, "未退货"),
    PART_RETURN_GOODS(2, "已部分退货"),
    ALL_RETURN_GOODS(3, "已全部退货"),

    ;

    private int code;

    private String name;

    OrderInfoReturnGoodStatusEnum(int code, String name) {
        this.code = code;
        this.name = name;
    }

    public int getCode() {
        return this.code;
    }

    public String getName() {
        return this.name;
    }

    public static OrderInfoReturnGoodStatusEnum get(int code) {
        for (OrderInfoReturnGoodStatusEnum aparameterStatus : values()) {
            if (aparameterStatus.getCode() == code) {
                return aparameterStatus;
            }
        }
        return null;
    }

    public static String getName(int code) {
        for (OrderInfoReturnGoodStatusEnum aparameterStatus : values()) {
            if (aparameterStatus.getCode() == code) {
                return aparameterStatus.getName();
            }
        }
        return null;
    }
}
